<<<(main)
#include "$(lower_base_name)_param.h"

<<<(enums)<<<(comments)//$(comment)
>>>void operator <<= (O_STREAM& os, const $(service_name)::$(enum_name)& v)
{
	os <<= (long)v;
}
void operator >>= (I_STREAM& is, $(service_name)::$(enum_name)& v)
{
	long l(0);
	is >>= l;
	v = ($(enum_name))l;
}
>>>

<<<(structs)
void operator <<= (O_STREAM& os, const $(service_name)::$(struct_name)& v)
{
<<<(struct_members)	os <<= v.$(member_name);
>>>}
void operator >>= (I_STREAM& is, $(service_name)::$(struct_name)& v)
{
<<<(struct_members)	is >>= v.$(member_name);
>>>}
>>>

namespace $(service_name)
{

<<<(structs)
$(struct_name)::$(struct_name)()<<<(none,have_struct_default_member)
:<<<(struct_default_members)<<<(none,!is_first), >>>$(member_name)($(default_value))>>>>>>
{
}
<<<(none,have_struct_member)
$(struct_name)::$(struct_name)(<<<(struct_members)<<<(none,!is_first), >>>$(const_member_ref_type) $(member_name)_>>>)
:<<<(struct_members)<<<(none,!is_first), >>>$(member_name)($(member_name)_)>>>
{
}>>>

<<<(none,is_key)
bool operator < (const $(struct_name)& l, const $(struct_name)& r)
{<<<(struct_members)
	if(l.$(member_name) != r.$(member_name))
		return l.$(member_name) < r.$(member_name);	
>>>	return false;
}
bool operator == (const $(struct_name)& l, const $(struct_name)& r)
{<<<(struct_members)
	if(l.$(member_name) != r.$(member_name))
		return false;>>>
	return true;
}
bool operator != (const $(struct_name)& l, const $(struct_name)& r)
{
	return !(l == r);
}>>>
>>>

<<<(methods,have_ack)
long Mm_$(method_name)::get_pktype(void) const
{
	return $(pktype);
}
void Mm_$(method_name)::buildCmd(O_STREAM& os) const
{
<<<(in_args)	os <<= $(arg_name);
>>>}
void Mm_$(method_name)::parseCmd(I_STREAM& is)
{
<<<(in_args)	is >>= $(arg_name);
>>>}
void Mm_$(method_name)::buildAck(O_STREAM& os) const
{
<<<(out_args)	os <<= $(arg_name);
>>>}
void Mm_$(method_name)::parseAck(I_STREAM& is)
{
<<<(out_args)	is >>= $(arg_name);
>>>}
Mm_$(method_name)::Mm_$(method_name)()
{
}<<<(none,have_in_arg)
Mm_$(method_name)::Mm_$(method_name)(<<<(in_args)<<<(none,!is_first), >>>$(const_arg_ref_type) $(arg_name)_>>>)
:<<<(in_args)<<<(none,!is_first), >>>$(arg_name)($(arg_name)_)>>>
{
}>>>
>>>

<<<(methods,!have_ack)
long Me_$(method_name)::get_pktype(void) const
{
	return $(pktype);
}
void Me_$(method_name)::buildCmd(O_STREAM& os) const
{
<<<(in_args)	os <<= $(arg_name);
>>>}
void Me_$(method_name)::parseCmd(I_STREAM& is)
{
<<<(in_args)	is >>= $(arg_name);
>>>}
Me_$(method_name)::Me_$(method_name)()
{
}<<<(none,have_in_arg)
Me_$(method_name)::Me_$(method_name)(<<<(in_args)<<<(none,!is_first), >>>$(const_arg_ref_type) $(arg_name)_>>>)
:<<<(in_args)<<<(none,!is_first), >>>$(arg_name)($(arg_name)_)>>>
{
}>>>
>>>

<<<(exception_defs)
long Mex_$(exception_name)::get_pktype(void) const
{
	return $(pktype);
}

void Mex_$(exception_name)::buildCmd(O_STREAM& os) const
{
	ACE_ASSERT(false);
}
void Mex_$(exception_name)::parseCmd(I_STREAM& is)
{
	ACE_ASSERT(false);
}
void Mex_$(exception_name)::buildAck(O_STREAM& os) const
{
<<<(exception_members)	os <<= $(arg_name);
>>>}
void Mex_$(exception_name)::parseAck(I_STREAM& is)
{
<<<(exception_members)	is >>= $(arg_name);
>>>}
Mex_$(exception_name)::Mex_$(exception_name)()
{
}<<<(none,have_exception)
Mex_$(exception_name)::Mex_$(exception_name)(<<<(exception_members)<<<(none,!is_first), >>>$(const_arg_ref_type) $(arg_name)_>>>)
:<<<(exception_members)<<<(none,!is_first), >>>$(arg_name)($(arg_name)_)>>>
{
}>>>
>>>
};
>>>